﻿using DapperExtensions;
using Dapper;
using DapperExtensions.Mapper;
using DapperExtensions.Sql;
using Logistics.Model;
using Logistics.Model.Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Logistics_Dao
{
    public class CompushBaseDao
    {

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="mod"></param>
        /// <returns></returns>
        public int AddCompushBase(wuliu_compush_base mod)
        {
            using (var conn = ConnectionHelper.OpenConnection())
            {
                return conn.Insert<wuliu_compush_base>(mod);
            }
        }

      

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mod"></param>
        /// <returns></returns>
        public int AddCompushBaseMomory(wuliu_compush_base_momory mod)
        {
            using (var conn = ConnectionHelper.OpenConnection())
            {
                string sql = " INSERT INTO wuliu_compush_base_momory VALUES(" + mod.push_id + "," + mod.account_id + ",'" + mod.content + "'," + mod.state + "," + mod.type + ")";
                return conn.Execute(sql);
            }
        }
    }
}
